package com.cxx.purchasecharge.dal;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import com.cxx.purchasecharge.core.model.persistence.GoodsSerialNumber;
import com.cxx.purchasecharge.dal.common.GenericCRUDDao;

@Transactional
public interface GoodsSerialNumberDao extends GenericCRUDDao <GoodsSerialNumber, Long>
{
    public GoodsSerialNumber findBySerialNumber (String serialNumber);

    @Query (value = "select g from GoodsSerialNumber g where g.goods=?1")
    public List <GoodsSerialNumber> findByGoods (long goodsId);

}
